package com.woniu.controller;

import com.woniu.form.FileUploadForm;
import com.woniu.form.SetOffFireworksForm;
import com.woniu.service.FileService;
import com.woniu.vo.SetOffFireworksVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @Author LXB
 * @Date 2024/1/5 22:05
 * @Description
 **/
@RestController("FileController")
@RequestMapping("/file")
@Api(tags = "文件")
public class FileController {

    @Autowired
    private FileService fileService;

    @ApiOperation(value = "上传文件")
    @PostMapping("/upload")
    @ApiImplicitParams({})
    public String upload(@RequestBody @Valid FileUploadForm form){
        return fileService.upload(form);
    }

}
